package seven.test_7_17;

import java.util.Scanner;
import java.util.Stack;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Stack<Character> stack = new Stack<>();
        int n = scanner.nextInt();
        while (n / 100 > 0) {
            for (int i = 0; i < 3; i++) {
                int tmp = n %  10;
                char c = (char) ('0' + tmp);
                stack.push(c);
                n /= 10;
            }
            if(n != 0) {
                stack.push(',');
            }
        }
        if(n != 0) {
            System.out.print(n);
        }
        while (stack.size() > 0){
            System.out.print(stack.pop());
        }
    }
}
